package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 汽车实体类
 */
@TableName("t_car")
public class CarBean {
    /**编号*/
    @TableId(value = "pk_carId",type = IdType.AUTO)
    private Integer id;
    /**品牌*/
    @TableField("c_type")
    private String type;
    /**价格*/
    @TableField("c_price")
    private Integer price;
    /**所属公民*/
    @TableField(exist = false)
    private ManBean man;
    /**公民编号*/
    @TableField("fk_manId")
    private Integer manId;

    public CarBean(String type, Integer price) {
        this.type = type;
        this.price = price;
    }

    public CarBean(String type, Integer price, Integer manId) {
        this.type = type;
        this.price = price;
        this.manId = manId;
    }

    public CarBean() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public ManBean getMan() {
        return man;
    }

    public void setMan(ManBean man) {
        this.man = man;
    }

    public Integer getManId() {
        return manId;
    }

    public void setManId(Integer manId) {
        this.manId = manId;
    }

    @Override
    public String toString() {
        return "CarBean{" +
                "id=" + id +
                ", type='" + type + '\'' +
                ", price=" + price +
                ", man=" + man +
                ", manId=" + manId +
                "}\n";
    }
}
